package com.shunli.cterminal.mapstruct;

import com.shunli.cterminal.model.res.GoodsTemplateVO;
import com.shunli.cterminal.model.res.H5OrderInfoVO;
import com.shunli.cterminal.model.res.OrderAndTempConfig;
import com.shunli.cterminal.model.res.TempConfigOrder;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author: 清水
 * @Date: 2025/4/16
 */
@Mapper
public interface TempConverter {

    TempConverter INSTANCE = Mappers.getMapper(TempConverter.class);

    @Mapping(target = "title", source = "goodsName")
    OrderAndTempConfig tempConfigConverter(GoodsTemplateVO templateVo);

    @Mapping(target = "payDomain", source = "orderInfoVO.payConfigInfo.payDomain")
    @Mapping(target = "channelCode", source = "orderInfoVO.payConfigInfo.channelCode")
    TempConfigOrder adOrderConverter(H5OrderInfoVO orderInfoVO);



}
